\(\int x \sqrt {x+x^2} \, dx\) [41]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 48 \[ \int x \sqrt {x+x^2} \, dx=-\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \text {arctanh}\left (\frac {x}{\sqrt {x+x^2}}\right ) \]

[Out]

1/3*(x^2+x)^(3/2)+1/8*arctanh(x/(x^2+x)^(1/2))-1/8*(1+2*x)*(x^2+x)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {654, 626, 634, 212} \[ \int x \sqrt {x+x^2} \, dx=\frac {1}{8} \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )+\frac {1}{3} \left (x^2+x\right )^{3/2}-\frac {1}{8} (2 x+1) \sqrt {x^2+x} \]

[In]

Int[x*Sqrt[x + x^2],x]

[Out]

-1/8*((1 + 2*x)*Sqrt[x + x^2]) + (x + x^2)^(3/2)/3 + ArcTanh[x/Sqrt[x + x^2]]/8

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 626

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1
))), x] - Dist[p*((b^2 - 4*a*c)/(2*c*(2*p + 1))), Int[(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c}, x]
 && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 0] && IntegerQ[4*p]

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \left (x+x^2\right )^{3/2}-\frac {1}{2} \int \sqrt {x+x^2} \, dx \\ & = -\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{16} \int \frac {1}{\sqrt {x+x^2}} \, dx \\ & = -\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {x+x^2}}\right ) \\ & = -\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.10 \[ \int x \sqrt {x+x^2} \, dx=\frac {1}{24} \sqrt {x (1+x)} \left (-3+2 x+8 x^2-\frac {3 \log \left (-\sqrt {x}+\sqrt {1+x}\right )}{\sqrt {x} \sqrt {1+x}}\right ) \]

[In]

Integrate[x*Sqrt[x + x^2],x]

[Out]

(Sqrt[x*(1 + x)]*(-3 + 2*x + 8*x^2 - (3*Log[-Sqrt[x] + Sqrt[1 + x]])/(Sqrt[x]*Sqrt[1 + x])))/24

Maple [A] (verified)

Time = 2.10 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.77

method result size
trager \(\left (\frac {1}{3} x^{2}+\frac {1}{12} x -\frac {1}{8}\right ) \sqrt {x^{2}+x}-\frac {\ln \left (2 \sqrt {x^{2}+x}-1-2 x \right )}{16}\) \(37\)
default \(\frac {\left (x^{2}+x \right )^{\frac {3}{2}}}{3}-\frac {\left (1+2 x \right ) \sqrt {x^{2}+x}}{8}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{16}\) \(38\)
risch \(\frac {\left (8 x^{2}+2 x -3\right ) x \left (1+x \right )}{24 \sqrt {x \left (1+x \right )}}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{16}\) \(38\)
meijerg \(-\frac {\frac {\sqrt {\pi }\, \sqrt {x}\, \left (-40 x^{2}-10 x +15\right ) \sqrt {1+x}}{60}-\frac {\sqrt {\pi }\, \operatorname {arcsinh}\left (\sqrt {x}\right )}{4}}{2 \sqrt {\pi }}\) \(39\)
pseudoelliptic \(-\frac {x^{3} \left (-16 \sqrt {x \left (1+x \right )}\, x^{2}-4 x \sqrt {x \left (1+x \right )}+3 \ln \left (\frac {\sqrt {x \left (1+x \right )}-x}{x}\right )-3 \ln \left (\frac {x +\sqrt {x \left (1+x \right )}}{x}\right )+6 \sqrt {x \left (1+x \right )}\right )}{48 \left (\sqrt {x \left (1+x \right )}-x \right )^{3} \left (x +\sqrt {x \left (1+x \right )}\right )^{3}}\) \(96\)

[In]

int(x*(x^2+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

(1/3*x^2+1/12*x-1/8)*(x^2+x)^(1/2)-1/16*ln(2*(x^2+x)^(1/2)-1-2*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.77 \[ \int x \sqrt {x+x^2} \, dx=\frac {1}{24} \, {\left (8 \, x^{2} + 2 \, x - 3\right )} \sqrt {x^{2} + x} - \frac {1}{16} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \]

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="fricas")

[Out]

1/24*(8*x^2 + 2*x - 3)*sqrt(x^2 + x) - 1/16*log(-2*x + 2*sqrt(x^2 + x) - 1)

Sympy [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.77 \[ \int x \sqrt {x+x^2} \, dx=\sqrt {x^{2} + x} \left (\frac {x^{2}}{3} + \frac {x}{12} - \frac {1}{8}\right ) + \frac {\log {\left (2 x + 2 \sqrt {x^{2} + x} + 1 \right )}}{16} \]

[In]

integrate(x*(x**2+x)**(1/2),x)

[Out]

sqrt(x**2 + x)*(x**2/3 + x/12 - 1/8) + log(2*x + 2*sqrt(x**2 + x) + 1)/16

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.96 \[ \int x \sqrt {x+x^2} \, dx=\frac {1}{3} \, {\left (x^{2} + x\right )}^{\frac {3}{2}} - \frac {1}{4} \, \sqrt {x^{2} + x} x - \frac {1}{8} \, \sqrt {x^{2} + x} + \frac {1}{16} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} + x} + 1\right ) \]

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="maxima")

[Out]

1/3*(x^2 + x)^(3/2) - 1/4*sqrt(x^2 + x)*x - 1/8*sqrt(x^2 + x) + 1/16*log(2*x + 2*sqrt(x^2 + x) + 1)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.79 \[ \int x \sqrt {x+x^2} \, dx=\frac {1}{24} \, {\left (2 \, {\left (4 \, x + 1\right )} x - 3\right )} \sqrt {x^{2} + x} - \frac {1}{16} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \]

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="giac")

[Out]

1/24*(2*(4*x + 1)*x - 3)*sqrt(x^2 + x) - 1/16*log(abs(-2*x + 2*sqrt(x^2 + x) - 1))

Mupad [B] (verification not implemented)

Time = 9.11 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.69 \[ \int x \sqrt {x+x^2} \, dx=\frac {\ln \left (x+\sqrt {x\,\left (x+1\right )}+\frac {1}{2}\right )}{16}+\frac {\sqrt {x^2+x}\,\left (8\,x^2+2\,x-3\right )}{24} \]

[In]

int(x*(x + x^2)^(1/2),x)

[Out]

log(x + (x*(x + 1))^(1/2) + 1/2)/16 + ((x + x^2)^(1/2)*(2*x + 8*x^2 - 3))/24